import request from '@/utils/request'


// 个人规则项得分统计
export function memberItemStat(query) {
  return request({
    url: '/partybuilding/WorkScore/memberItemStat',
    method: 'get',
    params: query
  })
}

// 组织规则项得分统计
export function orgItemStat(query) {
  return request({
    url: '/partybuilding/WorkScore/orgItemStat',
    method: 'get',
    params: query
  })
}

// 积分申请保存
export function applyForAdding(data) {
  return request({
    url: '/partybuilding/WorkScore/applyForAdding',
    method: 'post',
    data: data
  })
}

// 组织积分申请列表
export function approvalListOrg(query, data) {
  return request({
    url: '/partybuilding/WorkScore/approvalListOrg',
    method: 'post',
    params: query,
    data: data
  })
}

// 个人积分申请列表
export function approvalList(query, data) {
  return request({
    url: '/partybuilding/WorkScore/approvalList',
    method: 'post',
    params: query,
    data: data
  })
}

// 查询个人积分列表
export function listWorkScore(query) {
  return request({
    url: '/partybuilding/WorkScore/listStat',
    method: 'get',
    params: query
  })
}


// 个人积分审批
export function approve(query, data) {
  return request({
    url: '/partybuilding/WorkScore/approve',
    method: 'post',
    params: query,
    data: data
  })
}

// 组织积分审批
export function approveOrg(query, data) {
  return request({
    url: '/partybuilding/WorkScore/approveOrg',
    method: 'post',
    params: query,
    data: data
  })
}

// 查询个人积分详细
export function getWorkScore(id) {
  return request({
    url: '/partybuilding/WorkScore/' + id,
    method: 'get'
  })
}

// 新增个人积分
export function addWorkScore(data) {
  return request({
    url: '/partybuilding/WorkScore/add',
    method: 'post',
    data: data
  })
}

// 修改个人积分
export function updateWorkScore(data) {
  return request({
    url: '/partybuilding/WorkScore/edit',
    method: 'post',
    data: data
  })
}

// 删除个人积分
export function delWorkScore(id) {
  return request({
    url: '/partybuilding/WorkScore/remove/' + id,
    method: 'post'
  })
}
